{% extends "RegardInstituteBundle::layout.html.twig" %}

{% block title %}Institut de beaut&eacute;, &eacute;pilation Chartreux Marseille 4&egrave;me{% endblock %}

{% block content %}

<div id="INSTIT">
	
    <div id="div_add">
		{% if is_granted('ROLE_ADMIN') %}
		<br />
			<div>
				<a href="{{ path('regard_institute_category_add') }}">Ajouter une cat&eacute;gorie</a>
			</div>
		{% endif %}

		<div id="notice">
			{% for flashMessage in app.session.flashbag.get('notice') %}
				{{ flashMessage }}
			{% endfor %}
		</div>
    </div>
	
	{% for category in categories %}
		<div class="div_instit">
			<div class="div_image">
				<a href="{{ path('regard_institute_list_cares', {'categoryId': category.id, 'categoryName': category.title}) }}">
					<img src="{{ asset('img/content/'~category.picture) }}" title="{{ category.title }}" alt="{{ category.title }}"/>
				</a>
			</div>
			<div class="div_instit_text">
				<div class="div_title">
					<a href="{{ path('regard_institute_list_cares', {'categoryId': category.id, 'categoryName': category.title}) }}">
						{{ category.title }}
					</a>
				</div>
			</div>
			{% if is_granted('ROLE_ADMIN') %}
				<br />
				<span class="admin">
					&nbsp;<a href="{{ path('regard_institute_category_edit', {'categoryId': category.id}) }}">Mod</a>
				</span>
				<span class="admin">
					&nbsp;&#124;&nbsp;
				</span>
				<span class="admin">
					<a href="{{ path('regard_institute_category_delete', {'categoryId': category.id}) }}">Suppr</a>
				</span>
			{% endif %}
		</div>
	{% endfor %}
</div>

{% endblock %}
